package cn.lynch.bbs.domain;

import java.util.Date;


/**
 * 附件
 * @author lynch
 *
 */
public class Attachment {

	private String id;
	
	/**
	 * 所属文章（主题或回复）
	 */
	private Reply reply;
	
	/**
	 * 上传时间
	 */
	private Date uploadTime;
	
	/**
	 * 是否删除
	 */
	private boolean deleted;
	
	/**
	 * 是否可见
	 */
	private boolean available;
	
	/**
	 * 售价 
	 */
	private float charge;
	
	/**
	 * 保存文件夹
	 */
	private String savePath;
	
	/**
	 * 文件名
	 */
	private String filename;
	
	/**
	 * 扩展名
	 */
	private String extension;
	

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}


	public Reply getReply() {
		return reply;
	}

	public void setReply(Reply reply) {
		this.reply = reply;
	}

	public Date getUploadTime() {
		return uploadTime;
	}

	public void setUploadTime(Date uploadTime) {
		this.uploadTime = uploadTime;
	}

	public boolean isDeleted() {
		return deleted;
	}

	public void setDeleted(boolean deleted) {
		this.deleted = deleted;
	}

	public boolean isAvailable() {
		return available;
	}

	public void setAvailable(boolean available) {
		this.available = available;
	}

	public float getCharge() {
		return charge;
	}

	public void setCharge(float charge) {
		this.charge = charge;
	}
	
	public boolean isFree() {
		return this.charge == 0;
	}

	public String getSavePath() {
		return savePath;
	}

	public void setSavePath(String savePath) {
		this.savePath = savePath;
	}

	public String getFilename() {
		return filename;
	}

	public void setFilename(String filename) {
		this.filename = filename;
	}

	public String getExtension() {
		return extension;
	}

	public void setExtension(String extension) {
		this.extension = extension;
	}
	
	
}
